home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
1000 Apple LAN Literacy
/
1000 Apple LAN Literacy.iso
/
Apple LAN Literacy
/
Literacy Segments Part 1
/
Literacy Segments Part 1
/
stack.txt
< prev
Wrap
Text File
|
1989-08-22
|
27KB
|
897 lines
-- stack: in
-- format: 8 (HyperCard 1)
-- flags: 0x1000 (none)
-- protect password hash: 0
-- maximum user level: 5 (scripting)
-- window: Rect(x1=0, y1=0, x2=0, y2=0)
-- screen: Rect(x1=0, y1=0, x2=0, y2=0)
-- card dimensions: w=0 h=0
-- scroll: x=0 y=0
-- background count: 56
-- first background id: 2631
-- card count: 174
-- first card id: 28227
-- list block id: 54520
-- print block id: 3382
-- font table block id: 0
-- style table block id: 0
-- free block count: 0
-- free size: 0 bytes
-- total size: 640704 bytes
-- stack block size: 25600 bytes
-- created by hypercard version: 0x01228000
-- compacted by hypercard version: 0x01228000
-- modified by hypercard version: 0x01228000
-- opened by hypercard version: 0x01228000
-- patterns[0]: 0x0000000000000000
-- patterns[1]: 0x8000000008000000
-- patterns[2]: 0x8800220088002200
-- patterns[3]: 0x8888222288882222
-- patterns[4]: 0x88AA22AA88AA22AA
-- patterns[5]: 0xCCAA33AACCAA33AA
-- patterns[6]: 0xEEAABBAAEEAABBAA
-- patterns[7]: 0xEEBBBBEEEEBBBBEE
-- patterns[8]: 0xFFBBFFEEFFBBFFEE
-- patterns[9]: 0xFFBBFFFFFFBBFFFF
-- patterns[10]: 0x8010022001084004
-- patterns[11]: 0xFFFFFFFFFFFFFFFF
-- patterns[12]: 0x8822882288228822
-- patterns[13]: 0x1122448811224488
-- patterns[14]: 0xC4800C6843023026
-- patterns[15]: 0xB130031BD8C00C8D
-- patterns[16]: 0xAA00AA00AA00AA00
-- patterns[17]: 0x8822552288225522
-- patterns[18]: 0x8855225588552255
-- patterns[19]: 0x77DD77DD77DD77DD
-- patterns[20]: 0x8000000000000000
-- patterns[21]: 0xAA55AA55AA55AA55
-- patterns[22]: 0x038448300C020101
-- patterns[23]: 0x8244394482010101
-- patterns[24]: 0x8814224188412214
-- patterns[25]: 0x8080413E080814E3
-- patterns[26]: 0x22048C7422179810
-- patterns[27]: 0xBE808808EB088880
-- patterns[28]: 0x25C8328964244C92
-- patterns[29]: 0xA29C41BE2AC914EB
-- patterns[30]: 0x40A00000040A0000
-- patterns[31]: 0x8040200002040800
-- patterns[32]: 0xAA00800088008000
-- patterns[33]: 0xFF80808080808080
-- patterns[34]: 0x081C22C180010204
-- patterns[35]: 0xFF808080FF080808
-- patterns[36]: 0xF87422478F172271
-- patterns[37]: 0xBF00BFBFB0B0B0B0
-- patterns[38]: 0xFF7FBE5DA2418000
-- patterns[39]: 0xFAF5FAF5A050A050
-- checksum: 0x0
----- HyperTalk script -----
---------------------------------------------------------------------
-- “Network & Communications”
-- “Apple LAN Literacy Course”
-- © 1989 Apple Computer, Inc. &
-- © 1989 Courseware, Inc. &
-- © 1989 HyperPro, Inc.
--
-- Version 1.0f5
----------------------------------------------------------------------
-- Stack: Literacy Segments Part 1
--
-- HANDLERS: openstack,findSetUp,openBackground,Lesson,InstantReference,
-- goItem,beenHereFlag,SSpopUp,doSS,checkBookmark,
-- askBookmark,Help,MainMenu,SSQuit,doMenu,Map,Scrapbook,
-- Index,Glossary,Note,BookMark,SnapShot,saveMyPlace,
-- saveIdentifier,goBackWhere,popBack,popWhere,Search,
-- returnKey,enterKey,searchForIt,SwitchStack
-- FUNCTIONS: whereAmI,validField
-- RESOURCES:
-- ICON: Student Services,GrayPrev,Help,Prev Card,Lg #2,Lg #3,
-- Lg #1 Outline,Lg #2 Outline,Lg #3 Outline,Lg #1,#1,#2,
-- #1 Outline,#2 Outline,GrayNext,Next Card,Grey Up Arrow,
-- Up Arrow,Modem,Telephone,Computer w/backdrop,Satelite Dish,
-- Telephone Lines,Computer Cable,String,Tin Cans,Cable,
-- Computer,Printer,To Menus,Lg #4,Lg #4 Outline,#3,#4,#5,
-- #3 Outline,#4 Outline,#5 Outline
-- XFCN: kPopUp
-- vers:
-- DITL: Answer
-- FONT: Garamond
--
----------------------------------------------------------------------
--
-- By Apple Computer, Inc., Courseware, Inc. & HyperPro, Inc.
--
----------------------------------------------------------------------
on openstack
global setupOk
get the version
if it < 1.2 then
answer "This stack requires HyperCard v1.2.2 or later."
go back
exit to HyperCard
end if
if setupOk is empty then findSetup -- otherwise it's true, continue
global gSystemFile,useSS,mapTracker
if useSS then
open file gSystemFile
read from file gSystemFile for 16384
put line 1 to 3 of it into theContents
close file gSystemFile
put mapTracker into line 4 of theContents --*!*
open file gSystemfile
write theContents to file gSystemFile
close file gSystemFile
end if
hide menubar
hide msg
end openStack
on findSetUp
set lockmessages to true
set cursor to watch
go stack "Literacy Course"
if the result is "cancel" then
answer "Unable to continue. “Literacy Course” not found."
domenu Quit Hypercard
exit to Hypercard -- exit calling handlers
else -- found course setup card
set lockmessages to false
send openstack to this stack -- the setup stack
exit to HyperCard
end if
end findSetUp
on openBackground
global mapTracker
get char 1 to 5 of the short name of this bg
if it is not in mapTracker then
put it & "," after mapTracker
end if
pass openBackground
end openBackground
on Lesson
lock screen
set cursor to watch
put char 1 to 5 of the short name of this bg into segNum
go "Literacy Main Menu"
get script of bg btn "Card Key"
put offset(segNum,it) into temp
put line (number of lines in char 1 to temp of it) of it into theCard
delete char 1 to 6 of theCard
go cd theCard
unlock screen with visual zoom open
end Lesson
on InstantReference segNum
lock screen
get the clickloc
put item 1 of it into x
put item 2 of it into y
put left of the target + width of the target - x into x1
put y - top of the target into y1
put x - item 1 of the loc of the target into x2
put y - item 2 of the loc of the target into y2
subtract left of the target from x
subtract top of the target from y
if SQRT(x2*x2 + y2*y2) > 27 then exit InstantReference
if x1 < y1
then
if x < y
then
go cd 1 of bg (segNum && "Practice")
else
go cd 1 of bg (segNum && "Example")
end if
else
if x < y
then
go cd 1 of bg (segNum && "Information")
else
go cd 1 of bg (segNum && "Content")
end if
end if
unlock screen
end InstantReference
on goItem
put last char of the short name of the target into temp
put "#" & temp into btnNumb -- btn names are #1, #2, etc
put "422" & temp into iconNumb -- or "424" for large numbers
set the icon of btn btnNumb to iconNumb
go cd temp + the number of this cd
end goItem
on beenHereFlag itemNum,lineNum
global btnStatus
-- if line (other than first) of var is empty, then placement of data
-- in particular "item" doesn't work due to HyperCard 1.2.2 bug. So if
-- line empty, string "dummy" goes in, data placed, & string pulled.
if line lineNum of btnStatus is empty
then put "dummy" into line lineNum of btnStatus
put "true" into item itemNum of line lineNum of btnStatus
if item 1 of line lineNum of btnStatus = "dummy"
then put empty into item 1 of line lineNum of btnStatus
end beenHereFlag
-----------------Here are the StudentServices scripts ------------------
-- version 1.0f4
on SSpopUp
global useSS,course
set hilite of the target to true
get kPopUp("init",999) -- creates menu in memory
-- "(" is meta character for disable item.
if useSS then
get the short name of this stack
if (it contains "scrapbooK") or (it contains "snapshot") then
put "MainMenu;" & "(" & "BookMark…;" & "(" & "Note…;" & "(" & "SnapShot…;Index;Scrapbook;" & "Search…;Map;Glossary;Quit…" into choice
else
put "MainMenu;BookMark…;Note…;SnapShot…;Index;Scrapbook;" & "Search…;Map;Glossary;Quit…" into choice
end if
else
put "MainMenu;" & "(" & "BookMark…;" & "(" & "Note…;" & "(" & "SnapShot…;" & "(" & "Index;" & "(" & "Scrapbook;" & "Search…;Map;Glossary;Quit…" into choice
end if
if not course then -- needed for scrapbook & snaps scripts only
put "(" & "MainMenu;" & "(" & "BookMark…;" & "(" & "Note…;" & "(" & "SnapShot…;Index;Scrapbook;" & "Search…;" & "(" & "Map;Glossary;Quit…" into choice
end if
get kPopUp("append",999,choice) -- 999 is reference #
-- popup menu doesn't show yet
get kPopUp("pop",999,1,bottom of the target,left of the target + 1)
-- pop returns ID number of menu, number of item selected
set cursor to watch
put kPopUp("GetItem",item 1 of it,item 2 of it) into command
-- returns text of item
get kPopUp("toss",999) -- remove menu from memory
set hilite of the target to false
if last char of command is "…" then delete last char of command
-- Don't use "quit" -- potential conflicts with home scripts
if command = "quit" then put SSQuit into command
checkBookmark command
if command ≠ "no such menu" then
do command
end if
end SSpopUp
on doSS
global scrapFile
if the short name of this stack contains "scrapbook" then
send doSS to bg 1 -- script is there, shortcut heirarchy
exit to HyperCard
end if
lock screen
push card
set lockmessages to true
set cursor to watch
go stack scrapFile
if the result is "cancel" then popBack
-- call with Literacy, ANP, or Administration from courses *!*
-- call with "scrapbook" from snapshots or scrapbook *!*
put SSDialog("Literacy") into command --*!*
pop card
unlock screen
set lockmessages to false
checkBookmark command
-- Don't use "quit" -- potential conflicts with home scripts
if command = "quit" then put SSQuit into command
if command = "Cancel" then exit doSS
else do command
end doSS
on checkBookmark command
global useSS
if whereAmI() then exit checkBookMark
if not useSS then exit checkBookMark
if command = "MainMenu" or command = "Index" or command = "Scrapbook" or command = "Map" or command = "Glossary" then askBookmark command
end checkBookmark
on askBookmark command
global bookmarkPref
if bookmarkPref then
answer "Create Bookmark before going to" && command & "?" with "Cancel" or "Just go" or "Bookmark"
else
answer "Create Bookmark before going to" && command & "?" with "Cancel" or "Bookmark" or "Just go"
end if
if it is "Cancel" then exit to HyperCard
if it is "just go" then put false into bookmarkPref
if it is "Bookmark" then
put true into bookmarkPref
bookmark
end if
end askBookmark
on Help
global course
if not course then
answer "Help is not available without the course."
exit help
end if
lock screen
saveMyPlace
set cursor to watch
go stack "N&C Help"
if the result is "cancel" then goBackWhere -- exits
hide cd pict
unlock screen with visual dissolve
wait 30
show cd pict
end Help
on MainMenu
lock screen
set LockMessages to true
set cursor to watch
go stack "Literacy Main Menu" -- or Literacy or Administration *!*
if the result is "cancel" then exit to Hypercard
-- Literacy doesn't do this.
if the short name of this stack is "ANP Main Menu" then
repeat with k = the number of cds down to 1
go cd k
opencard
end repeat
end if
set lockMessages to false
unlock screen with visual dissolve
end MainMenu
on SSQuit
global gSystemFile,useSS,mapTracker,menuHilites,course
global bookmarkPref,wherewecamefrom,OKtoQuit,scrapFile
put whereAmI() into fromScrapbook --*!* use false in peripherals
if not useSS then put true into fromScrapbook -- no bookmarks
if fromScrapbook then
answer "Do you want to quit the course?" with "Cancel" or "Yes, quit"
if it is "Cancel" then
exit to Hypercard
end if
else
if bookmarkPref then
answer "Create Bookmark & quit this course?" with "Cancel" or "Just quit" or "OK"
else
answer "Create Bookmark & quit this course?" with "Cancel" or "OK" or "Just quit"
end if
if it is "Cancel" then exit to hypercard
if it is "OK" then bookmark
end if
if not fromscrapbook then saveMyPlace
if useSS and course then
open file gSystemFile
read from file gSystemFile for 16384
put line 1 to 2 of it into theContents
close file gSystemFile
put wherewecamefrom into line 3 of theContents
put mapTracker into line 4 of theContents
open file gSystemfile
write theContents to file gSystemFile
close file gSystemFile
lock screen
go stack scrapFile
put theContents into cd fld "hidden name"
end if
put true into OKtoQuit
domenu "Quit Hypercard"
exit to hypercard
end SSquit
on doMenu var
global OKtoQuit
if OKtoQuit is empty then put false into OKtoQuit
if var = "Find..." then search --*!* not in peripherals
else if var = "Quit HyperCard" and OKtoQuit is false then ssQuit
else if var = "Quit HyperCard" and OKtoQuit then pass doMenu
else pass doMenu
end doMenu
on Map
global gSystemFile
put whereAmI() into fromScrapbook
if gSystemFile contains "ANP" then put true into ANPCourse
else put false into ANPCourse
saveMyPlace
lock screen
if ANPCourse then
put char 1 to 5 of short name of this stack into temp
else
put char 1 to 5 of the short name of this bg into temp
end if
set cursor to watch
go stack "Literacy Map" -- or Literacy or Administration *!*
if the result is "cancel" then goBackWhere -- exits
if fromScrapbook then
unlock screen with visual dissolve
exit map
end if
if not ANPCourse then -- Literacy map
set icon of bg btn temp to 1201
put temp into num
put "0" into last char of temp -- calc number for current lesson
put script of bg btn "lesson key" into theList
-- "Lesson Key" holds # of first cd where lesson appears
put offset(temp,theList) into theLine
put word 2 of line (number of lines in char 1 to theLine of theList) of theList into theCard
go cd theCard
show cd fld "instruction"
put num into hiliter
else -- ANP map
click at the loc of bg btn temp
put "Go" && temp into hiliter
end if
unlock screen with visual dissolve
repeat 3
set the hilite of btn hiliter to true
wait 20
set the hilite of btn hiliter to false
wait 20
end repeat
end Map
on Scrapbook
global scrapFile,whereWeCameFrom
put whereAmI() into fromScrapbook
saveMyPlace
set cursor to watch
lock screen
go cd 1 of stack scrapFile
if the result is "cancel" then goBackWhere -- exits
if fromScrapbook then delete last item of wherewecameFrom
send openbackground to this cd
unlock screen with visual dissolve
end Scrapbook
on Index
global scrapFile,whereWeCameFrom
put whereAmI() into fromScrapbook
saveMyPlace
lock screen
set cursor to watch
go cd "Index" of stack scrapFile
if the result is "cancel" then goBackWhere -- exits
if fromScrapbook then delete last item of whereWeCameFrom
send openbackground to this cd
unlock screen with visual dissolve
end Index
on Glossary
global scrapFile,whereWeCameFrom
put whereAmI() into fromScrapbook
saveMyPlace
lock screen
set cursor to watch
go cd "Glossary" of stack scrapFile
if the result is "cancel" then goBackWhere -- exits
if fromScrapbook then delete last item of whereWeCameFrom
send openbackground to this cd
unlock screen with visual dissolve
end Glossary
-- note isn't available from Student Scrapbook
on Note
global scrapFile
saveIdentifier
put false into madeNote
push cd
set cursor to watch
lock screen
set lockMessages to true
go cd "index" of stack scrapFile
if the result is "cancel" then popBack -- exits
put makeNote() into myResult
if myResult is "successful" then put true into madeNote
pop cd
set lockmessages to false
if madeNote then unlock screen with iris open to black
else unlock screen
if myResult is "SS" then doSS
end Note
-- Bookmark isn't available from Student Scrapbook.
on BookMark
global scrapFile
saveIdentifier
saveMyPlace
put false into madeBookMark
push cd
set cursor to watch
lock screen
set lockMessages to true
go cd "index" of stack scrapFile
if the result is "cancel" then popWhere -- exits
put makeBookMark() into myResult
if myResult is "successful" then put true into madeBookMark
pop cd
set lockmessages to false
if madeBookMark then unlock screen with iris open to black
else unlock screen
if myResult is "SS" then doSS
end bookMark
-- Snapshot isn't available from the Student Scrapbook.
on SnapShot
global scrapFile
saveMyPlace
saveIdentifier
put false into madeSnapShot
push cd
set cursor to watch
lock screen
unlock screen -- for refresh, since we're taking a picture of it
lock screen
set lockMessages to true
go cd "index" of stack scrapFile
if the result is "cancel" then popWhere -- exits
put makeSnapShot() into myResult
if myResult is "successful" then put true into madeSnapShot
pop cd
set lockmessages to false
if madeSnapShot then unlock screen with iris open to black
else unlock screen
if myResult is "SS" then doSS
end SnapShot
function whereAmI
get the short name of this stack
if it contains "scrapbook" or it contains "snapshot" then
return true
else
return false
end if
end whereAmI
on saveMyPlace
global whereWeCameFrom
put the id of this cd && "of stack" && quote & the short name of this stack & quote into thisPlace
if not (last item of whereWeCameFrom = thisPlace) then
put thisPlace into item (number of items in whereWeCameFrom) + 1 of whereWeCameFrom
end if
end saveMyPlace
on saveIdentifier
global identifier
put the short name of this cd into identifier
end saveIdentifier
on goBackWhere
global wherewecamefrom
set cursor to watch
go last item of whereWeCameFrom
delete last item of whereWeCameFrom
set lockMessages to false
exit to Hypercard
end goBackWhere
on popBack
pop card
set lockMessages to false
exit to hypercard
end popBack
on popWhere
global whereWeCameFrom
pop card
delete last item of whereWeCameFrom
set lockMessages to false
exit to Hypercard
end popWhere
----------------- Search script handlers…
--
-- Search script hunts for string through multiple stacks.
-- Each stack must have the handlers in it for this to work.
-- Modified from TIE search script which was written by Garth
-- Catterall and Ken Laws. Leslie Grimm
on Search
global gfindWhat,gfindHow,gFindWhere,gWhichStack,gFirstStack, gFindFlag,gFirstCard,gFindCount,gFirstChunk,gStartCard,gLastCard, gNumStacks,gNextStack
global scrapFile
push card
lock screen
set lockmessages to true
set cursor to watch
put whereAmI() into fromScrapbook
go stack scrapFile
if the result is "cancel" then
pop card into trash -- clean up stack
exit to Hypercard
end if
-- get gfindWhat,gfindWhere,gfindHow & gNextStack
put searchDialog(fromScrapbook) into myResult
if myResult is "SS" then
pop card
set lockmessages to false
unlock screen
doSS
exit search
end if
if myResult is "Cancel" then
pop card
set lockmessages to false
unlock screen
exit search
end if
if myResult is "Bookmark" then
pop card
set lockmessages to false
bookmark
push card
-- then continue search
end if
put empty into gFirstChunk -- reset variables
put empty into gFirstCard
put the visible of the msg into visiMsg
put empty into msg -- so return/enter will work. See below.
set the visible of the msg to visimsg
put 0 into gFindCount
put 1 into gWhichStack
put true into gFindFlag -- search is valid
pop card
push card -- so we can come back later
unlock screen -- screen refresh
lock screen
put the number of this cd into gStartCard
if not fromScrapbook then saveMyPlace -- to get back from glossary
put the short name of this stack into gFirstStack
-- initialize index for searching through multiple stacks
put the number of items in gNextStack into gNumstacks
put false into inList
repeat with i = 1 to gNumStacks
if (item i of gNextStack contains gFirstStack) then
put i into gWhichStack
put true into inList
exit repeat
end if
end repeat
if not inList then
put 1 into gWhichStack
put item 1 of gNextStack into gFirstStack
set lockmessages to true
go stack gFirstStack
put 1 into gStartCard
end if
searchForIt
end Search
on returnKey
global gFindWhat,gFindFlag,gNextStack
if (gFindWhat ≠ empty) and (gFindFlag = true) and (the msg is empty) then
searchForIt
else
-- ** put empty into gNextStack -- clear possibly big variable
pass returnKey
end if
end returnKey
on enterKey
global gFindWhat,gFindFlag,gNextStack
if (gFindWhat ≠ empty) and (gFindFlag = true) and (the msg is empty) then
searchForIt
else
--** put empty into gNextStack -- clear possibly big variable
pass enterKey
end if
end enterKey
on searchForIt
global gFindWhat,gFindHow,gFindWhere,gWhichStack,gNumStacks, gStartCard,gFindFlag,gFirstCard,gFindCount,gFirstChunk,gLastCard
set cursor to busy
--** lock screen
put the number of this cd into gLastCard
set lockmessages to true
repeat
set cursor to busy
if gFindHow = "Exact String" then find string gFindWhat
else if gFindHow = "First Characters" then find gFindWhat
else if gFindHow = "Whole Word(s)" then find whole gFindWhat
put the FoundChunk into holder -- eg char 1 to 6 of cd fld 4
put the short name of the FoundField into checker
if holder is empty then -- not found anywhere in the stack
-- if we were only looking in one stack, then leave
if gNumstacks = 1 then
pop card -- go back where we started
answer "Couldn’t find “" & gFindWhat & ".”"
put false into gFindFlag
set lockmessages to false
exit searchForIt
else
SwitchStack
next repeat
end if
end if
if gFirstChunk is empty then -- set our references
put holder into gFirstChunk -- eg char 1 to 6 of cd fld 4
put the number of this cd into gFirstCard
else
-- is this where we started the search?
if (holder = gFirstChunk) and (the number of this card = gFirstCard) then
if gNumStacks > 1 then
SwitchStack
next repeat
end if
if gFindCount = 0 then
pop card
answer "“" & gFindWhat & "” not found."
put false into gFindFlag
put empty into gNextStack -- free the memory
set lockmessages to false
exit searchForIt
else
answer "No more occurrences of “" & gFindWhat & "” were found."
if gStartCard ≠ (the number of this cd) or gLastCard ≠ (the number of this cd) then
answer "Stay here or go back to beginning card?" with "Stay" or "Go back"
if it is "go back" then pop card
else
pop cd into throwaway -- clean up our poo-poo
if the short name of this bg is "glossary" or the short name of this bg is "snapshots" then
-- update return arrow and tabs
send openbackground to this background
end if
end if
end if
end if
put false into gFindFlag
set lockmessages to false
exit searchForIt
end if
end if
-- We do the check for valid fields after setting firstCard
-- so that we know where the first found item was, even though
-- it might not be visible.
if the short name of this cd is "glossary" then
if gFindWhere contains "glossary" then
send openbackground to bg "glossary" -- to mask tabs if needed
add 1 to gFindCount
send glossFind to bg "glossary"
exit searchforit
else
next repeat -- skip
end if
end if
if the visible of the FoundField is false then next repeat
if not validField(checker) then next repeat
add 1 to gFindCount
exit repeat
end repeat
end searchForIt
-- Test whether the field in which the text was found is a valid one.
function validField fieldName
global gfindWhere
-- do a quick repeat to ensure it's a field we want to find in
-- Note that this is slower, but more definitive than a "contains"
-- This defines the fields that we don't want to find in...
if the short name of this stack contains "Scrapbook" then
put "Title,Lines,List holder,MyName,Identifier,Date/Time," & "instruction,comment,the word,definition" into badFields
-- don't search notes if this is a glossary-only search
if not (gfindWhere contains "scrapbook") then
put ",list,Note" after badFields -- skip note cards
end if
else
-- it's a course or snapshot
put "StackName,Instruction,instruction2," & "Indicator,Title" into badFields
end if
repeat with i = 1 to number of items in badFields
if fieldName = item i of badFields then
return false
end if
end repeat
return true
end validField
on SwitchStack
global gFindWhat,gFindHow,gFindWhere,gWhichStack,gFirstStack, gStartCard,gFindFlag,gFirstCard,gFindCount,gFirstChunk,gNextStack
set cursor to busy
if gWhichStack < (the number of items in gNextStack) then
add 1 to gWhichStack
else
put 1 into gWhichStack
end if
if (item gWhichStack of gNextStack) contains gFirstStack then
if gFindCount = 0 then
pop card -- back to start
answer "“" & gFindWhat & "” not found."
put false into gFindFlag
put empty into gNextStack -- free the memory
set lockmessages to false
exit to HyperCard
else
answer "No more occurrences of “" & gFindWhat & "” were found."
end if
if gFindCount > 0 then
answer "Stay here or go back to beginning card?" with "Stay" or "Go back"
if it is "go back" then
set lockmessages to true
pop card -- to return from whence we came...
set lockmessages to false
unlock screen with visual iris close
else
pop card into trash -- clean up
if the short name of this bg is "glossary" or the short name of this bg is "snapshots" then
-- update return arrow and tabs
send openbackground to this background
end if
end if
put false into gFindFlag
exit to hypercard
end if
else -- go look in next stack
set lockmessages to true
set lockmessages to true
go stack (item gWhichStack of gNextStack)
set lockmessages to false
unlock screen with visual wipe left
lock screen
put empty into gFirstChunk -- resets "gone once around stack" var.
end if
end SwitchStack
--------------- End of stuff to copy to all course stacks -----------